﻿using System;
using System.Diagnostics;
using System.Windows;
using HibernatingRhinos.Profiler.Appender.EntityFramework;
using ManagerClient.Authentification.Logic;
using ManagerClient.Authentification.Views;

namespace ManagerClient
{
    /// <summary>
    ///     Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            try
            {
                EntityFrameworkProfiler.Initialize();
                var logVM = Container.Container.Instance.GetInstance<LoginWindowViewModel>();
                var loginView = new LoginWindow {DataContext = logVM};
                loginView.Show();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
        }
    }
}